<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.xteam.ecsystem.utils.AppConfig"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";

	//获取商品
	String bgiId = request.getParameter("bgiId");
	String bgiName = new String(request.getParameter("bgiName")
			.getBytes("ISO8859_1"), "UTF-8");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>商品管理-商品关联</title>
		<jsp:include page="../../include/base.jsp"></jsp:include>
		<jsp:include page="../../include/common.jsp"></jsp:include>
		<jsp:include page="../../include/baseManage.jsp"></jsp:include>
		<script type="text/javascript">
		var bgiId = "<%=bgiId%>";
		var bgiName = "<%=bgiName%>";
		//产品图片路径
		var propath='<%=AppConfig.getProductImagePath()%>';
		//磁盘实际路径根目录
		var realpath='<%=AppConfig.getRealPath()%>';
		var imgpath=realpath+propath;
	</script>
	</head>
	<body style="margin: 0 auto; padding: 0">
		<div class="mini-toolbar"
			style="border: 0; font-size: 12px; padding-left: 6px;">
			<!-- 操作面板 -->
			<div class="operatePanel">
				<div
					style="padding: 0; border: 1px solid #A9ACB5; background: #EBEDF2; display: inline-block; zoom: 1; vertical-align: middle;">
					<div id="spanButtonPlaceholder"></div>
				</div>
				<input class="mini-button" text="上传" iconCls="icon-upload"
					plain="false" onclick="picStartUpload()" />
				<input class="mini-button" text="停止上传" iconCls="icon-lock"
					plain="false" onclick="picStopUpload()" />
				<input class="mini-button" text="删除所有" iconCls="icon-remove"
					plain="false" onclick="deleteAll()" />
			</div>
		</div>
		<div class="mini-fit" id="picUploadPanel">
			<div id="picUploadGrid" class="mini-datagrid" fitColumns="true"
				multiSelect="true" pageSize="20" idField="id" showPageSize="false"
				showTotalCount="false" allowSortColumn="false" virtualScroll="true"
				url="" style="width: 100%; height: 100%"
				borderStyle="border-bottom:0;border-left:0;border-right:0;">
				<div property="columns">
					<div type="indexcolumn" width="20" headerAlign="center">
						序号
					</div>
					<div field="name" name="name" width="80" headerAlign="center"
						align="center">
						文件名
					</div>
					<div field="type" name="type" width="40" headerAlign="center"
						align="center">
						类型
					</div>
					<div field="size" name="size" width="40" headerAlign="center"
						align="center" renderer="onSizeRender">
						大小
					</div>
					<div field="percent" name="percent" width="80" headerAlign="center"
						align="center" renderer="onPercentRender">
						上传进度
					</div>
					<div field="state" name="state" width="40" headerAlign="center"
						align="center" renderer="onStateRender">
						状态
					</div>
					<div name="id" width="40" headerAlign="center" align="center"
						renderer="onActionRender">
						操作
					</div>
					<div field="imgPath" name="imgPath" visible="false">
						保存返回文件名
					</div>
				</div>
			</div>
		</div>
	</body>
	<script src="handler/PicUploadHandler.js" type="text/javascript"></script>
</html>